var axios = require('axios');
//通用方法
exports.POST = (url, params) => {
    return axios.post(url, params).then(res => res.data)
}

exports.GET = (url, params) => {
    return axios.get(url, {params: params}).then(res => res.data)
}

exports.PUT = (url, params) => {
    return axios.put(url, params).then(res => res.data)
}

exports.DELETE = (url, params) => {
    return axios.delete(url, {params: params}).then(res => res.data)
}

exports.PATCH = (url, params) => {
    return axios.patch(url, params).then(res => res.data)
}